<template>
  <div id="costtable">
    <el-table :data="data.list" border style="width: 100%">
        <el-table-column prop="apply_type" label="费用类型" align="center">
            <template slot-scope="scope">
              {{scope.row.cost_type.title}}
            </template>
        </el-table-column>
        <el-table-column prop="course_fee" label="费用金额" align="center">
          <template slot-scope="scope">
            {{scope.row.cost_money}} 元
          </template>
        </el-table-column>
        <el-table-column prop="people" label="操作人" align="center">
          <template slot-scope="scope">
            {{scope.row.operate_user}}
          </template>
        </el-table-column>
         <el-table-column prop="time" label="操作时间" align="center">
           <template slot-scope="scope">
             {{scope.row.update_time}}
           </template>
         </el-table-column>
    </el-table>
    <!-- 分页组件 -->
    <el-row>
        <el-col :span='12'>
            <span style="color:#fff;">1</span>
        </el-col>
        <el-col :span='12'>
        <el-pagination
        class="fr"
          background
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="data.page.page"
          :page-sizes="[8]"
          :page-size="8"
          layout="total, sizes, prev, pager, next"
          :total="data.page.total">
        </el-pagination>
        </el-col>
    </el-row>

  </div>
</template>

<script>
export default {
  data() {
    return {
      //成绩记录页码
      rpage:1,
      //成绩记录一页多少数据
      rtotal:5,
      //表格数据
      tableData: [
          {
              type:'全款',
              course_fee:'2000元',
              people:'王五',
              time:'2021-01-17'
          },
          {
              type:'全款',
              course_fee:'2000元',
              people:'王五',
              time:'2021-01-17'
          },
          {
              type:'全款',
              course_fee:'2000元',
              people:'王五',
              time:'2021-01-17'
          },
          {
              type:'全款',
              course_fee:'2000元',
              people:'王五',
              time:'2021-01-17'
          }
      ],
    }

  },
  props:{
    data:{
        type:Object,
        default:()=>{
          return {}
        }
    }
  },
  methods:{
      //翻页
      handleSizeChange(val){
   this.rtotal = val
   //this.getrecordList()
   this.$emit('getCostList',val)
      },
      //当前页
      handleCurrentChange(val){
 this.rpage = val
         //this.getrecordList()
          this.$emit('getCostList',val)
      }
  }
}
</script>

<style scoped lang='scss'>

</style>
